import { formatDate } from "@/utils/date";
import {
  coalType,
  businessType,
  transportMethod,
  settlementMethod,
  checkMethod,
} from "@/select/user";
export const dataList = [
  {
    label: "交货时间",
    value: "deliveryTime",
    format: function (value) {
      return value
        .split("-")
        .map((it) => +it)
        .map((v) => formatDate(v))
        .join("-");
    },
  },
  {
    label: "采购数量",
    value: "count",
    format: function (value) {
      return value + "万吨";
    },
  },
  {
    label: "交货地点",
    value: "address",
    format: function (value) {
      return value;
    },
  },
  {
    label: "保证金缴纳",
    value: "depositPayment",
    format: function (value) {
      return value + "元/吨";
    },
  },
  {
    label: "履约保证金缴纳",
    value: "performance",
    format: function (value) {
      return value + "元/吨";
    },
  },
  {
    label: "收到基低位发热量",
    value: "hot",
    format: function (value) {
      return value + "KCal/kg";
    },
  },
  {
    label: "收到基全硫",
    value: "s",
    format: function (value) {
      return value + "%";
    },
  },
  {
    label: "干燥无灰基挥发",
    value: "dryGray",
    format: function (value) {
      return value + "%";
    },
  },
  {
    label: "空干基全硫",
    value: "dryS",
    format: function (value) {
      return value + "%";
    },
  },
  {
    label: "全水分",
    value: "water",
    format: function (value) {
      return value + "%";
    },
  },
];

export const list = [
  {
    label: "煤炭类型",
    value: "coalType",
    data: coalType,
  },
  {
    label: "商业类型",
    value: "businessType",
    data: businessType,
  },
  {
    label: "运输方式",
    value: "transportMethod",
    data: transportMethod,
  },
  {
    label: "结算方式",
    value: "settlementMethod",
    data: settlementMethod,
  },
  {
    label: "验收方式",
    value: "checkMethod",
    data: checkMethod,
  },
];
